package day_per_month;

public class Month {

	private int month;

	public Month(int m) {
		month = m;
	}

	public int getDays() {
		if (month < 1 || month > 12) {
			return 0;
		} else if ((month <= 7 && month % 2 == 1)
				|| (month >= 8 && month <= 12 && month % 2 == 0)) {
			return 31;
		} else if (month == 2) {
			return 28;
		} else {
			return 30;
		}
	}
}
